Skip to content

fix(formfield): rename duplicate FormEmits type to FormFieldEmits#8421

Open
YevheniiKotyrlo wants to merge 1 commit intoprimefaces:masterfrom
YevheniiKotyrlo:fix/formfield-duplicate-formemits-type
Open

fix(formfield): rename duplicate FormEmits type to FormFieldEmits#8421
YevheniiKotyrlo wants to merge 1 commit intoprimefaces:masterfrom
YevheniiKotyrlo:fix/formfield-duplicate-formemits-type

Conversation

@YevheniiKotyrlo
Copy link

@YevheniiKotyrlo YevheniiKotyrlo commented Feb 6, 2026

Defect Fixes

Fixes #8420

@primevue/forms exports FormEmits from both the Form and FormField modules. When a project uses skipLibCheck: false, TypeScript reports TS2308 — a duplicate export collision that prevents clean type-checking of @primevue/forms.

Problem

// @primevue/forms/index.d.ts
export * from '@primevue/forms/form';       // exports FormEmits
export * from '@primevue/forms/formfield';  // also exports FormEmits — collision!
error TS2308: Module '@primevue/forms/form' has already exported
a member named 'FormEmits'. Consider explicitly re-exporting to
resolve the ambiguity.

FormField.d.ts was copied from Form.d.ts and the type name wasn't updated during copy-paste. The FormFieldEmitsOptions interface is already correctly named — only the type alias and DefineComponent declarations were missed.

Changes

  • Rename FormEmitsFormFieldEmits in formfield/FormField.d.ts (type alias + 2 DefineComponent usages)
  • Fix 4 JSDoc comments: "Form component" → "FormField component"

Follows the existing [ComponentName]Emits naming convention used by all 100+ PrimeVue components (ButtonEmits, AccordionEmits, TreeSelectEmits, etc.).

Scope / Impact

  • No breaking changesFormEmits from FormField was unusable due to the collision anyway
  • No runtime changes — types only (.d.ts file)
  • Fixes TS2308 for all consumers using skipLibCheck: false

Verification

Gate Result
tsc --noEmit in packages/forms/ TS2308 resolved
Naming convention audit (100+ components) All use [ComponentName]Emits
All CI gates (format, lint, test, build) PASS

@YevheniiKotyrlo YevheniiKotyrlo changed the title "%PRTITLE%" fix(formfield): rename duplicate FormEmits type to FormFieldEmits Feb 6, 2026
@YevheniiKotyrlo YevheniiKotyrlo force-pushed the fix/formfield-duplicate-formemits-type branch from 72029d1 to cd97caa Compare February 6, 2026 12:29
@YevheniiKotyrlo YevheniiKotyrlo force-pushed the fix/formfield-duplicate-formemits-type branch from cd97caa to 726b3b1 Compare March 4, 2026 18:23
@YevheniiKotyrlo
Copy link
Author

Hi — just checking in on this PR and the related type fixes. Is there anything else needed from my side?

I have 4 open PRs that all address skipLibCheck: false type errors in PrimeVue's .d.ts files:

  1. fix(formfield): rename duplicate FormEmits type to FormFieldEmits #8421 — Rename duplicate FormEmitsFormFieldEmits (1 file)
  2. fix(eventbus): add missing type declarations for EventBus subpath exports #8423 — Add missing type declarations for EventBus subpath exports (8 files)
  3. fix(inputtext,datepicker): remove unreachable undefined from emit types #8443 — Remove unreachable undefined from InputText/DatePicker emit types (2 files)
  4. fix(datatable,datepicker): enable generic type inference for T, F, and V #8444 — Enable generic type inference for DataTable/DatePicker v-model (2 files)

All are type-only changes (no runtime impact), each is independent and can be merged separately, and all are rebased on latest master. Happy to adjust anything if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FormField.d.ts exports duplicate FormEmits type colliding with Form

1 participant